<template>


  <div class="homecontent">

    <div id="header">
      <button id="home_btn_img"><img src="@/assets/image/bmob.png"></button>
      <div style="float: right">
        <el-button class="home_login" type="primary" @click="saveNavState('/login')">登录</el-button>
        <el-button class="home_registered" @click="saveNavState('/registered')">注册</el-button>

      </div>
      <div id="menu">
        <a class="home_btn" href="#home">主页</a>
      </div>
      <router-view></router-view>
    </div>


  </div>
</template>

<script>
  export default {
    name: "Root",
    methods: {
      saveNavState(activePath) {
        this.$router.push(activePath)
      }
    }

  }
</script>

<style scoped>
  .homecontent {
    height: 100%;
    width: 100%;
    background-color: #D9D9D9;
  }

  #header {
    height: 50px;
    word-wrap: break-word;
    word-break: normal;
    background-color: #8c939d;
  }

  #home_btn_img {
    margin: 10px 0 0 20px;
  }

  .home_login {
    padding: 5px 20px;
    margin-top: 12px;
  }

  .home_registered {
    padding: 5px 20px;
    margin-top: 12px;
    margin-right: 20px;
  }

  #menu {
    width: 60px;
    margin: -25px auto;
    /*margin-top: -15px;*/

  }

  .home_btn {
    padding: 5px 15px;
    background-color: white;
    text-align: center;
  }

  /*伪类 鼠标经过链接变换背景色*/
  a:hover {
    background-color: red;
  }


  #footer {
    border: 1px solid darkgray;
    background-color: darkgray;
    margin: 100px auto;
    border-radius: 25px;

  }

  .el-form {
    margin-top: 25px;
    margin-right: 30px;
  }

  .validation_code {
    float: right;
    /*padding: 5px 40px ;*/
    /*margin-right: 100px;*/
  }

  .div-code-position {
    position: relative;
  }

  .el-form-code {
    /*position: relative;*/
    width: 200px;

  }

  .validation_code_img {
    position: absolute;
    top: 10px;
    right: 15px;
    float: right;
    width: 80px;
  }

  .login_btn_action {
    float: right;
    padding: 10px 87px;
    margin: 23px 26px;
    /*margin: 20px 40px;*/
  }


</style>

